<?php
require_once("onlineupdater.class.php");

$update = new onlineUpdater();
//add server
$update->createPassword("thepassword");
$update->addServer("http://zpilman.com/test/","sendchunk2.php");
$update->createPassword("otherpassword");
$update->addServer("http://rijgjewereld.nl/test/","sendchunk2.php");

//start update
$update->setUpdateFolder("update");
echo "Total files to upload: ".count($update->files)."<br />\n";
echo "Total folders to create: ".count($update->folders)."<br />\n";

$update->setRemainingTime(true);
foreach($update->servers as $keyserver => $server) {
	echo '
	<ul>
		<li>
			'.$server[0].'
			<ul>
				<li>Total time folder upload: '.$update->timefolder[$keyserver].'</li>
				<li>Total time file 0kb upload: '.$update->timefile[$keyserver].'</li>
				<li>Total time file 10kb upload: '.$update->timefile10[$keyserver].'</li>
			</ul>
		</li>
	</ul>
	';
}

/*
$update->setRemainingTime(true);
$update->setProgressBar(true);
$update->setOverwrite(true);
//$update->setDifferentFolder("test/");

//localfile, onlineupdater
$update->updateFolder("update/","http://zpilman.com/test/sendchunk.php");
$update->updateFile("update/myfile.php","http://zpilman.com/test/sendchunk.php");
*/